{% extends "base.html" %}
{% load crispy_forms_filters %}
{% load i18n %}
{% load crispy_forms_tags %}

{% block title %}{% trans "注册" %}{% endblock %}

{% block content %}
<div class="container py-5">
  <div class="row justify-content-center">
    <div class="col-md-6">
      <div class="card shadow">
        <div class="card-header bg-primary text-white">
          <h1 class="h4 mb-0">{% trans "注册" %}</h1>
        </div>
        <div class="card-body">
          <p>{% blocktrans %}已经有账号了? 请 <a href="{{ login_url }}">登录</a>.{% endblocktrans %}</p>

          <form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">
            {% csrf_token %}
            {{ form|crispy }}
            {% if redirect_field_value %}
            <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
            {% endif %}
            <button class="btn btn-primary w-100 mt-3" type="submit">{% trans "注册" %}</button>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}

